//
//  UIButton+HSAdjustCotnet.m
//  HSTS
//
//  Created by Mine on 2017/6/14.
//  Copyright © 2017年 simon. All rights reserved.
//

#import "UIButton+HSAdjustCotnet.h"

@implementation UIButton (HSAdjustCotnet)
- (void)adjustImageAndTitle{
    
//    CGRect imgF     = self.imageView.frame;
    self.contentHorizontalAlignment =  UIControlContentHorizontalAlignmentLeft;
    self.titleEdgeInsets        = UIEdgeInsetsMake(0,8, 0, 0);
//    self.imageEdgeInsets        = UIEdgeInsetsMake(0, width - imgF.size.width - 5., 0, 0);
//    self.layer.borderWidth      = 1.0;
//    self.layer.cornerRadius     = 5.0;
//    self.layer.borderColor      = HSComplaintLineColor.CGColor;
}
- (void)adjustImageAndTitleTopAndDow
{
    self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;//使图片和文字水平居中显示
    
    [self setTitleEdgeInsets:UIEdgeInsetsMake(self.imageView.frame.size.height+10 ,-self.imageView.frame.size.width, 0.0,0.0)];//文字距离上边框的距离增加imageView的高度，距离左边框减少imageView的宽度，距离下边框和右边框距离不变
    
    [self setImageEdgeInsets:UIEdgeInsetsMake(-10, 0.0,0.0, -self.titleLabel.bounds.size.width)];//图片距离右边框距离减少图片的宽度，其它不边
}

- (void)adjustImageFile{
    
}
@end
